export default class Header {
  private open: boolean = false;
  private text: string;
  constructor() {
    const $text = $('.header-mini-text');
    const $float = $('.header-mini-float');
    this.text = $text.text();
    $('.header-mini-bar').on('click', () => {
      if (this.open) {
        this.open = false;
        $text.text(this.text);
        $float.removeClass('header-mini-float--active');
      } else {
        this.open = true;
        $text.text('关闭');
        $float.addClass('header-mini-float--active');
      }
    });
  }
}
